<%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
    <div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/csm/expInoutClass/index')">消耗品出入库字典列表</a>
                </li>
                <li>
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expInoutClass/form')">消耗品出入库字典添加</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="table-responsive no-border">
                        <div class="datatable-top">
                            <div class="pull-left">
                            	<form:form id="searchForm" modelAttribute="expInoutClass"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/csm/expInoutClass/index');" method="post" class="form-inline">
                                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                    <div class="form-group">
                                        <label>出入库区分:</label>&nbsp;&nbsp;
                                        <form:select  path="inoutType" maxlength="50" class="form-control">
                                            <from:option value="" label=""/>
                                            <form:options items="${fns:getDictList('EXP_INOUT_TYPE')}"  htmlEscape="false" itemLabel="label" itemValue="value"/>
                                        </form:select>
                                    </div>&nbsp;&nbsp;
                                    <div class="form-group"><label>库存类型:</label>&nbsp;&nbsp;<form:select path="storageType" maxlength="50" class="form-control">
                                        <from:option value="" label=""/><from:options items="${fns:getDictList('EXP_STORAGE_TYPE')}" htmlEscape="false" itemLabel="label" itemValue="value"/></form:select></div>&nbsp;&nbsp;
                                    <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                                </form:form>
                            </div>
                        </div>
                        <table id="contentTable" class="table table-bordered mg-t datatable">
                            <thead>
                                <tr>
                                        <th>出入库区分</th>
                                        <th>出入库分类</th>
                                        <th>所属类别</th>
                                        <th>库房级别</th>
                                        <th>来源等级</th>
                                        <th>是否记账</th>
                                        <th>备注信息</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="expInoutClass">
                                <tr>
                                        <td> ${fns:getDictLabels(expInoutClass.inoutType,"EXP_INOUT_TYPE" , "")}</td>
                                        <td> ${fns:getDictLabels(expInoutClass.type,"EXP_STOTARG_TYPE" , "")}</td>
                                        <td> ${fns:getDictLabels(expInoutClass.statisticClass,"EXP_STATISTIC_CLASS" , "")}</td>
                                        <td> ${fns:getDictLabels(expInoutClass.storageType,"EXP_STORAGE_TYPE" ,"" )}</td>
                                        <td> ${fns:getDictLabels(expInoutClass.fromLevel,"EXP_FROM_LEVEL","" )}</td>
                                        <td> ${fns:getDictLabels(expInoutClass.accountFlag,"YES_NO" ,"" )}</td>
                                        <td> ${expInoutClass.remarks}</td>
                                    <td>
                                        <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expInoutClass/form?id=${expInoutClass.id}')" class="btn btn-success btn-xs">修改</a>
                                        <a href="#"  class="applyBt btn btn-danger btn-xs"
                                           onclick="confirmExtend('确认要删除该条记录吗？',function(){delLoad('mainCenterDiv','${ctx}/csm/expInoutClass/delete?id=${expInoutClass.id}','${ctx}/csm/expInoutClass/index')})">删除</a>
                                    </td>
                                </tr>
                            </c:forEach>

                        </table>
                        <div class="pagination">${page}</div>
                    </div>
                </div>
            </section>
        </div>
    </div>